home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 46 / Amiga Format CD46 (1999-10-20)(Future Publishing)(GB)[!][issue 1999-12].iso / -in_the_mag- / reader_requests / scilab / demos / bike / macros / velo5.sci < prev    next >
Text File  |  1999-09-16  |  793b  |  25 lines

  1. function []=velo5()
  2. //  full wheels using xgeom et xfpoly
  3. // computations made by geom)
  4. t= t*180/%pi;
  5. p= p*180/%pi;
  6. xe=[xmin,xmax,xmax,xmin,xmin]
  7. ye=[ymin,ymin,ymax,ymax,ymin]
  8. param3d(xe,ye,zmin*ones(1,5),t,p," ",[1,0],rect);
  9. param3d(xprear(1,:),xprear(2,:),xprear(3,:),  t,p," ",[0,0])
  10. param3d(xpfront(1,:),xpfront(2,:),xpfront(3,:), t,p," ",[0,0])
  11. xset("alufunction",6)
  12. [xnt,ynt]=geom3d(xf,yf,zf);
  13. [xnf,ynf]=geom3d(xfrontar,yfrontar,zfrontar);
  14. [xnr,ynr]=geom3d(xrearar,yrearar,zrearar);
  15. /////////////////////////////////////
  16. [n1,n2]=size(xfrontar);
  17. deff('[]=velod(i)',['xpoly(xnt(:,i),ynt(:,i),''lines'')';
  18.       'xpoly(xnr(:,i),ynr(:,i),''lines'')';
  19.       'xpoly(xnf(:,i),ynf(:,i),''lines'');velodp(i);']);
  20. comp(velod);
  21. for i=1:1:n2,velod(i);velod(i);end
  22. velod(n2);
  23. xset("alufunction",3);
  24.  
  25.